package com.milhouz.wormdroid.gl.model;

import javax.microedition.khronos.opengles.GL10;

/**
 * A very basic, static textured background image
 */
public class BackgroundSprite extends GLSprite {

	public BackgroundSprite(int width, int height, int resourceId) {
		super(-1, 0, 0, width, height, true, resourceId);
	}

	@Override
	public void draw(GL10 gl, int zx, int zy, boolean isZoomed, float zoomFactor) {
		gl.glBindTexture(GL10.GL_TEXTURE_2D, getTextureName());
		gl.glPushMatrix();
		gl.glLoadIdentity();
		gl.glTranslatef(getX() + zx, getY() - zy, Z);
		mGrid.draw(gl, true);
		gl.glPopMatrix();
	}

}
